//
//  SandBoxHandler.m
//  GiftTalk
//
//  Created by dllo on 16/5/1.
//  Copyright © 2016年 JYJ. All rights reserved.
//

#import "SandBoxHandler.h"

@implementation SandBoxHandler
// Create  and init
+ (NSString *)saveInCachesWithFileName:(NSString *)name {
    return [[SandBoxHandler pathOfCaches]stringByAppendingPathComponent:name];
    
}

//找到缓存路径
+ (NSString *)pathOfCaches {
    NSString *path = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"CacheSource"];
    NSFileManager *manager = [NSFileManager defaultManager];
    [manager createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:nil];
    
    return path;
    
    
}


@end
